package com.iyunsir.goods.server.impl;
import com.iyunsir.goods.entity.Goods;
import com.iyunsir.goods.mapper.GoodsMapper;
import com.iyunsir.goods.server.GoodsService;
import com.iyunsir.goods.vo.GoodsQuery;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class GoodsServicelmpl implements GoodsService {
@Resource
private GoodsMapper goodsMapper;

    @Override
    public List<Goods> getGoodsList(GoodsQuery param) {
        return goodsMapper.getGoodsList(param);
    }

    @Override
    public Long countGoodsList(GoodsQuery param) {
        return goodsMapper.countGoodsList(param);
    }

    @Override
    public void addGoods(Goods goods) {
        goodsMapper.addGoods(goods);
    }

    @Override
    public void deleteGoodsByIds(String ids) {
        goodsMapper.deleteGoodsByIds(ids);
    }

    @Override
    public Goods getGoodsById(Integer id) {
        return goodsMapper.getGoodsById(id);
    }

    @Override
    public void updateGoods(Goods goods) {
        goodsMapper.updateGoods(goods);
    }
}
